//
// api.js
// hs-admin
//
// Created by 区区电脑 on 2023/04/23.
//



import axios from "@/request/axios.js";

/**
 * 文件上传-普通上传
 * @param params
 * @param data
 * @param onProgress
 * @returns {Promise | Promise<unknown> | *}
 */
export function upload(params, data, onProgress) {
    return axios({url: "/api/FileManage/UploadFile", method: "post", params, data, upload: true, onProgress})
}

/**
 * 文件上传-保留源文件
 * @param params
 * @param data
 * @param onProgress
 * @returns {Promise | Promise<unknown> | *}
 * @constructor
 */
export function UploadFileKeepOriginal(params, data, onProgress) {
    return axios({url: "/api/FileManage/UploadFileKeepOriginal", method: "post", params, data, upload: true, onProgress})
}
